package cn.liuxue.lifecircle.service;

import java.util.Random;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class LocalService extends Service {
	
	private final IBinder mBinder = new LocalBinder();
	private final Random mGenerator = new Random();
	
	
	public class LocalBinder extends Binder {
		public LocalService getService() {
			return LocalService.this;
		}
	}

	@Override
	public IBinder onBind(Intent arg0) {
		// TODO Auto-generated method stub
		return mBinder;
	}
	
	public int getRandom() {
		return mGenerator.nextInt(1000);
	}
	

}
